import { $post, $get, $put } from '../utils/request'

// adminList
export const SHOP_ADMIN_PAGE = (params, pageNo, pageSize) =>
  $post(
    `/store-platform/shop/admin/page?pageNo=${pageNo}&pageSize=${pageSize}`,
    params
  )

// admin岗位
export const FIND_APPLY_INFO_API = adminId =>
  $get(`/store-platform/shop/admin/info/${adminId}`)

// adminList
export const SHOP_ADMIN_UPDATE = params =>
  $put(`/store-platform/shop/admin/update`, params)

// 岗位管理
export const SHOP_ROLE_PAGE = (params, pageNo, pageSize) =>
  $post(
    `/store-platform/shop/role/page?pageNo=${pageNo}&pageSize=${pageSize}`,
    params
  )

// 查询店铺角色详情
export const FIND_ROLE_INFO_API = roleId =>
  $get(`/store-platform/shop/role/info/${roleId}`)

// 添加店铺角色
export const SHOP_ROLE_ADD = params =>
  $post(`/store-platform/shop/role/add`, params)

// 编辑店铺角色
export const SHOP_ROLE_UPDATE = params =>
  $put(`/store-platform/shop/role/update`, params)

// 添加店铺管理员
export const SHOP_ADMIN_ADD = params =>
  $post(`/store-platform/shop/admin/add`, params)
